{template "header.html"}

<div class="note note-danger">
    <p>数据表名称：{$table}，以下字段是读取数据表中已经创建的字段，如果需要新建字段需要在PhpMyAdmin等工具中创建字段</p>
</div>

    <form class="form-horizontal" role="form" id="myform">
        {dr_form_hidden()}
        <div class="table-scrollable">
            <table class="table table-striped table-bordered table-hover table-checkable dataTable">
                <thead>
                <tr class="heading">
                    <th width="90" style="text-align:center"> {dr_lang('可用')} </th>
                    <th width="220"> {dr_lang('字段')}</th>
                    <th width="100"> {dr_lang('类型')}</th>
                    <th> {dr_lang('操作')} </th>
                </tr>
                </thead>
                <tbody>
                {loop $field $t}
                {if $t != 'id'}
                <tr class="odd gradeX">
                    <td class="myselect">
                        <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
                            <input type="checkbox" class="checkboxes" name="ids[]" {if $my_field[$t]} checked{/if} value="{$t}" />
                            <span></span>
                        </label>
                    </td>
                    <td>{$t}
                        {if $my_field[$t] && $my_field[$t]['name'] && $my_field[$t]['name'] != $t}
                         - {$my_field[$t]['name']}
                        {/if}
                    </td>
                    <td>{if $my_field[$t]}
                        {$my_field[$t]['fieldtype']}
                    {/if}</td>
                    <td>
                        {if $my_field[$t]}
                        <label><a href="javascript:dr_iframe('字段{$t}', '{dr_url('dever/home/db_field_edit', ['dir'=>$dir, 'file'=>$file, 'tid' => $tid, 'field' => $t])}');" class="btn btn-xs blue"> {dr_lang('设置属性')} </a></label>
                        {else}
                        <font color="red">需要开启之后才能设置属性</font>
                        {/if}
                    </td>
                </tr>
                {/if}
                {/loop}
                </tbody>
            </table>
        </div>


    </form>
</div>


{template "footer.html"}